package com.yd.basemodule.interceptor


import com.tencent.ncnnyolox.basemodule.utils.MMKey
import com.tencent.ncnnyolox.basemodule.utils.MMkvUtils
import okhttp3.Interceptor
import okhttp3.Response

/**
 * <pre>
 *     author : yh
 *     e-mail : xxx@xx
 *     time   : 2023/12/22
 *     desc   :
 * </pre>
 */
class CommParamInterceptor :Interceptor{
    override fun intercept(chain: Interceptor.Chain): Response {
        var request = chain.request()
        request = request.newBuilder().addHeader("token", MMkvUtils.decodeString(MMKey.token))
            .addHeader("custom", "")
            .addHeader("Platform-Type","PC")

            .build()
        return chain.proceed(request)
    }
}